class Booktable < ActiveRecord::Base
  def self.search(search)
          if search
         
      find(:all, :conditions => ['booktables.nameBook LIKE ?', "%#{search}%"]) #, :order => 'products.product_id DESC')
 
          else
            find(:all)
          end
        end
end
